import service from '@/utils/request'

export const getRoles = () => {
  return service.get('/admin/roles')
}

export const createRoles = (data) => {
  return service.post('/admin/roles', data)
}

export const updateRoles = (data) => {
  return service.put('/admin/roles', data)
}

export const deleteRole = (id) => {
  return service.delete(`/admin/roles/${id}`)
}

export const deleteBatch = (ids) => {
  return service.delete('/admin/roles/batch', { data: ids })
}
